package cn.liyiming.bbs.config.web;

import cn.liyiming.bbs.core.interceptor.LoginHandlerInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 立以宁
 */
@Configuration
public class SystemWebMvcConfiurer implements WebMvcConfigurer {


    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(new LoginHandlerInterceptor()).addPathPatterns("/user/**").excludePathPatterns("/user/login","/user/reg","/user/forget");

    }


}
